package com.jing21.learn.basic.mapper;

import com.jing21.learn.intf.entity.LearnUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by 郑靖 on 2017/9/15.
 */
@Mapper
public interface UserMapper extends CommonMapper<LearnUser> {

    @ResultType(LearnUser.class)
    @Select("SELECT * from basic.learn_user " +
            "  where user_name=#{param} or email = #{param} or phone = #{param}")
    List<LearnUser> queryByUnique(@Param("param") String param);

}
